Contrast Plugin
contrast.js
by Eric Chen - eric2022czc@gmail.com
This is a plugin for comparing two views. Supports pano, flat image, and 360 video.
Maybe you can use it to show some contrast between day and night, before and after
renovation.
-
Anything you can write to <scene>, can be supported.
-
Supports left-right layout and up-down layout.
-
The support for the wireframe is only an experimental function at present, some mobile
do not display the wireframe.
Contrast Plugin
Thread
-
viewA
-
The xml path loaded by the first view, at left/top.
-
default=null
-
viewB
-
The xml path loaded by the first view, at right/bottom.
-
default=null
-
viewA_wireframe
-
Whether to enable the wireframe function of view A.
-
default=false
-
viewB_wireframe
-
Whether to enable the wireframe function of view B.
-
default=false
-
bgcolorA
-
The background color of view A.
-
default=0x99FFCC
-
bgcolorB
-
The background color of view B.
-
default=0x00CCFF
-
width
-
Current container width.
-
default=100%
-
height
-
Current container height.
-
default=100%
-
align
-
The container alignment.
-
default=lefttop
-
vertical
-
If vertical is true, the top-bottom layout will be used. The default layout is
left-right.
-
default=false
-
min_percentage
-
The smallest proportion of the smaller of the two views.This ensures that you
always see both views, rather than one completely covering the other.
-
default=0
-
divider_width
-
The width of the divider.
-
default=4
-
divider_color
-
The color of the divider.
-
default=0x000000
-
handler_bgcolor
-
The background color of the handler.
-
default=0xFFFFFF
-
handler_active_bgcolor
-
The background color of the handler when the mouse is pressed.
-
default=0xCC00FF
-
onready
-
This event is fired when both views are loaded.
-
default=null
Plugin Actions
-
loadview_scene(viewA_scene,
viewB_scene,
vars,
flags,
blend,
loaddone)