Verge3D
  • 欢迎访问Verge3D中文用户手册
  • 入门指引(Getting Started)
    • 初学指南
    • 工作流程
    • 拼图工具
    • 功能特性
    • 项目结构
    • 更新版本
    • 常见问题
      • 3D文件格式
      • SolidWorks
      • Revit
    • 实用链接
  • 一般主题(General Topics)
    • 资产压缩
    • 基于HTML的用户界面
    • Facebook发布3D主题
    • AR 和VR的开发
    • Wordpress插件
    • 使用JavaScript
    • 移动浏览器测试
  • 3ds Max 艺术家指南(3ds Max Artist's Guide)
    • 3ds Max安装Verge3D​
    • 材质系统
    • 阴影
    • 物理材质
    • 透明度
    • 视口和渲染预览
  • Blender 艺术家指南(Blender Artist's Guide)
    • Blender安装Verge3D
    • 材质系统概述
    • 阴影
    • 物理材质
    • 透明度
    • 使用材质库
    • 视口预览
  • 拼图参考
    • Initialization(初始化)
    • Events(事件)
    • Selectors(选择器)
    • Objects
    • Materials
    • Animation
    • Camera
    • Scenes
    • Misc
    • Time
    • HTML
    • AR/VR
    • Sound
    • Physics
    • Post-processing
    • Dictionaries
    • Variables
    • Procedures
    • System
    • Library
  • 程序员指南(Programmer's Guide)
    • 编程基础
    • 矩阵变换
    • 动画系统
    • 创建文本
    • 绘制线条
    • 更新事物
    • 约定
    • 获取资源
  • 开发者参考(Developer Reference)
    • Animation
      • AnimationAction
      • AnimationClip
      • AnimationMixer
      • AnimationObjectGroup
      • AnimationUtils
      • KeyframeTrack
      • PropertyBinding
      • PropertyMixer
    • Animation / Tracks
      • BooleanKeyframeTrack
      • ColorKeyframeTrack
      • NumberKeyframeTrack
      • QuaternionKeyframeTrack
      • StringKeyframeTrack
      • VectorKeyframeTrack
    • Application
      • App
      • AppPuzzles
      • AppUtils
    • Audio
      • Audio
      • AudioAnalyser
      • AudioContext
      • AudioListener
      • PositionalAudio
    • Cameras
      • ArrayCamera
      • Camera
      • CubeCamera
      • OrthographicCamera
      • PerspectiveCamera
      • StereoCamera
    • Constants
      • Animation
      • Core
      • CustomBlendingEquation
      • DrawModes
      • DrawModes
      • Materials
      • Renderer
      • Textures
    • Constraints
      • ChildOfConstraint
      • Constraint
      • CopyLocationConstraint
      • CopyRotationConstraint
      • CopyScaleConstraint
      • FloorConstraint
      • LimitLocationConstraint
      • LimitRotationConstraint
      • LimitScaleConstraint
      • LockedTrackConstraint
      • TargetConstraint
      • TrackToConstraint
    • 开发者参考
      • Controls
      • Core
      • Core / BufferAttributes
      • Deprecated
      • Extras
      • Extras / Core
      • Extras / Curves
      • Extras / Objects
      • Geometries
      • Helpers
      • Lights
      • Lights / Shadows
      • Loaders
      • Loaders / Managers
      • Materials
      • Math
      • Math / Interpolants
      • Objects
        • Annotation
        • AnnotationControl
        • Bone
        • Group
        • Line
        • LineLoop
        • LineSegments
        • LOD
        • Mesh Points
        • Skeleton
        • SkinnedMesh
        • Sprite
      • Renderers
        • RenderUtils
        • WebGLRenderer
        • WebGLRenderTarget
        • WebGLRenderTargetCube
      • Renderers / Shaders
        • ShaderChunk
        • ShaderLib
        • UniformsLib
        • UniformsUtils
      • Scenes
        • Fog
        • FogExp2
        • Scene
        • SceneBackground
      • Textures
        • CanvasTexture
        • CompressedTexture
        • CubeTexture
        • DataTexture
        • DataTexture3D
        • DepthTexture
        • Texture
        • VideoTexture
  • EXAMPLES
    • 案例
  • MISC
    • 杂项
Powered by GitBook
On this page
  • "open web page"
  • "social share link"
  • "call JS function"
  • "when called from JS"
  • "load data"
  • "send data"
  • "loaded data"
  • "read JSON"
  • "read CSV"
  • "save state"
  • "undo state"
  • "all variable names"
  • "variable value by name"
  • "place order"
  1. 拼图参考

Misc

PreviousScenesNextTime

Last updated 5 years ago

Miscellaneous puzzles to perform various operations on a high level.

"open web page"

"social share link"

"call JS function"

In order to add a function to JavaScript code, open the application .js file (for example, my_awesome_app.js located in verge3d/applications/my_awesome_app) with any text editor. Search for "prepareExternalInterface" and add your function inside that declaration (between the curly brackets), so that it looks like this:function prepareExternalInterface(app) { app.ExternalInterface.myJSFunction = function(numericArg, textArg) { alert('Got some params from Puzzles: ' + numericArg + ' and ' + textArg); } }

"when called from JS"

In order to trigger this puzzle from the JavaScript code, open the application .js file (for example, my_awesome_app.js located in verge3d/applications/my_awesome_app) with any text editor. Search for "runCode" and add a function call inside that declaration (between the curly brackets), so that it looks like this:function runCode(app) { app.ExternalInterface.myJSCallback('Hello, Puzzles!', 80); }

"load data"

"send data"

"loaded data"

"read JSON"

"read CSV"

Table rows and values are accessed by their numeric indices starting from 0.

"save state"

Saves the state of specified objects and/or the values of variables specified by their names. The objects are cloned and stored in memory. The values of the variables are retrieved and stored in memory for each specified variable name.

"undo state"

If this puzzle is called several times, the states are restored from the saved sequence (if any) which makes it possible to return to any previously saved state from the stack.

"all variable names"

Returns a list with the names of all variables used in Puzzles.

"variable value by name"

Returns the value of a variable specified by its name. This puzzle works similarly to the standard variable value puzzle, yet does not require to select a variable from the predefined dropdown menu.

"place order"

Verge3D comes with a free Wordpress plug-in that is able to handle requests submitted by this puzzle. Upon receiving such a request, this Wordpress plug-in renders a page with an extended form supplemented with contact and comments fields, the embedded screenshot and a captcha. Filled out form is finally submitted by the customer and a new order is created in Wordpress admin interface. Both the customer and the sales manager are notified about the order by e-mail.

Please refer to the Wordpress Plugin section of this Manual for setup information.

When this puzzle is triggered, a specified URL is opened in a new or in the same browser tab depending on the drop-down selection. When triggered from the Puzzles editor, it will ask for a user confirmation before leaving the tab.

Generates a link for sharing your application in popular social media.

Executes a function specified in the JavaScript code of the application. Optionally passes parameters to be used as function arguments.

Allows for triggering Puzzles from the JavaScript code of the application. Optionally retrieves parameters passed from the JavaScript code and saves them as variables to be used by puzzles in the "do" slot.

Attempts to load data from a specified location. The puzzles in the "once ready do" slot are interpreted regardless of whether the attempt was a success. The retrieved data can be accessed via the puzzle.

Attempts to send a specified data to a remote location using an asynchronous request. The puzzles in the "once ready do" slot are interpreted regardless of whether the attempt was a success. If there is any response data, it can be accessed via the puzzle.

Returns data retrieved by the or puzzles.

Interprets text as data which are returned in a dictionary.

Interprets text as . Returns a list of table rows, with each row represented as a list of values. The delimiter can be selected with the drop-down to correspond a CSV file's export settings. "From row" value denotes how many rows will be skipped starting from the top.

If this puzzle is called several times, the states are saved in sequence so that it is possible to return to any previous state with the puzzle.

Restores the state of objects and/or variables saved with the puzzle.

Composes a hidden order form with the "title", "contents" and "total price" fields and an optional screenshot and submits this form to a specified URL according to the specification explicated in the Wordpress Plugin section. By default the order form is submitted to the .

Be sure to enable screenshots in the puzzle otherwise the screenshot may be rendered in black.

loaded data
POST HTTP
loaded data
load data
send data
JavaScript Object Notation
#
comma-separated values
undo state
save state
demo ordering page
configure application