设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 77|回复: 0

[转载发布] Multiple Viewports

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    8259

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    30525
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    39678

    灌水之王

    发表于 6 天前 | 显示全部楼层 |阅读模式

    Multiple Viewports 1.2.1
    By Biud436


    Introduction
        This plugin provides the multiple viewports

    Features
        - This plugin can only use in PIXI 4.0.0 or more.

    Video

    Spoiler
    https://www.youtube.com/embed/cycVR4BuMN4





    How to Use

    SpoilerDownload the plugin and place it in the folder called your_project_directory/js/plugins.
                Then In Plugin Manager, Select the RS_MultipleViewports plugin and add it.




    Plugin Commands

    SpoilerThis is a plugin command that can activate the multiple viewports. If you call this plugin command, You can be using the multiple viewports.

                    Code:       
    1. MultipleViewport Enable
    复制代码


                This can disable the multiple viewports. If you call this plugin command, You can be using original stage renderer. But, Note that any drawing object of previous view-port is not removed in memory so if you will need it, you try to call the 'MultipleViewport ClearImage ViewID' plugin command.

                    Code:       
    1. MultipleViewport Disable
    复制代码


                This is the plugin command that can set the power of the viewport shake.

                    Code:       
    1. MultipleViewport StartShake shakePower
    复制代码


                This is the plugin command that can set the end of the viewport shake.

                    Code:       
    1. MultipleViewport EndShake
    复制代码


                This is the plugin command that can set an image of certain viewport (View ID is number between 1 and 4)

                    Code:       
    1. MultipleViewport Image ViewID ImageName
    复制代码


                This is the plugin command that can delete the image of certain viewport  (View ID is number between 1 and 4)

                    Code:       
    1. MultipleViewport ClearImage ViewID
    复制代码


                This is the plugin command that can set the video to certain viewport.
                Note that the file type should set the WEBM(.webm)

    ViewID is the number between 1 and 4.
                szSrc Indicates the video name from the movies directory.
                loop allows you to set with the true or false.
                You can repeat the video via this value. (If you are omitted this loop value, its video will only play once)

                    Code:       
    1. MultipleViewport Video viewID szSrc loop
    复制代码


                This command moves back x seconds from current video position.

                    Code:       
    1. MultipleViewport MoveBackSeconds viewID second
    复制代码


                This command moves forward x seconds from current video position.

                    Code:       
    1. MultipleViewport MoveForwardSeconds viewID second
    复制代码


                This is the plugin command can play the video to certain viewport.

                    Code:       
    1. MultipleViewport PlayVideo viewID
    复制代码


                This is the plugin command can stop the video to certain viewport.

                    Code:       
    1. MultipleViewport StopVideo viewID
    复制代码


                This is the plugin command can pause the video to certain viewport.

                    Code:       
    1. MultipleViewport PauseVideo viewID
    复制代码


                This is the plugin command can remove the video to certain viewport.

                    Code:       
    1. MultipleViewport ClearVideo viewID
    复制代码


                This plugin command allows you to change a display position of the viewport
    'viewID' is the number between 1 and 4.
                If 'EventID' is same as -1, the viewport target will set as the game player. if not, it will set as certain event.

    You might wonder what happens to the viewport after this command has executed.

    By default, the viewport is stored the id of certain target and it is tracking available its position until before moving as the next map. if it is also not set specific target id to certain viewport, it will set as the player position. The target can belong to an instance of ViewportTarget(the object that can control display's position as target's position) and each instance will set an inner position of the viewport by using the function called $gameMap.setDisplayPos.​
                    Code:       
    1. MultipleViewport Target viewID EventID
    复制代码






    Plugins

        This plugin can be downloaded in the following link.

    Github RAW

    Change Log

    Spoiler2016.06.13 (v1.0.0) - First Release.
                2016.08.24 (v1.1.0) - Now RPG Maker MV 1.3.0 or more is supported.
                2016.08.24 (v1.1.2) - Added Plugin Commands
                2016.08.25 (v1.1.4) - Added the functions that sets an image of certain viewport.
                2016.09.30 (v1.1.5) - Added the function that plays the video to certain viewport.
                2016.10.01 (v1.1.6) - Added the rendering code that is compatible with the canvas mode.
                2016.10.20 (v1.1.7) - Fixed the issue that is not working in RMMV 1.3.2
                2016.10.23 (v1.1.8) - Fixed the issue that the video frame is not updated in PIXI 4.0.3
                2016.11.24 (v1.1.9) - Now this can change the viewport orientation such as portrait, landscape and can also set the number of viewports.
                2016.11.26 (v1.2.0) - Added certain code to remove the texture from memory.
                2017.02.08 (v1.2.1) :           
                - Added new function that could change the inner position of certain viewport by using the function called             $gameMap.setDisplayPos.
                - Fixed an issue that is remaining the previous texture in certain viewport if the user sets the same thing again to certain viewport when playing the video in certain viewport.
                - Converted some sources to ES6




    Credit and Thanks
        - Biud436

    Terms of Use
        Free for commercial and non-commercial use.


    本贴来自国际rpgmaker官方论坛作者:biud436处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/multiple-viewports.67300/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-1 18:50 , Processed in 0.117875 second(s), 51 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表