This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
* Licensed under the Apache License, Version 2.0 (the "License"). | |
* You may not use this file except in compliance with the License. | |
* A copy of the License is located at | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* or in the "license" file accompanying this file. This file is distributed | |
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | |
* express or implied. See the License for the specific language governing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WEBGL // p5 WEBGL rendering mode. | |
createCanvas(w, h, renderer) // Creates a 3D canvas (if renderer is WEBGL). | |
// Primitives | |
plane(width, height) // Creates a plane in 3D space. Equivalent to rect() in the default rendering mode. | |
plane(width, height, detailX, detailY) // Creates a plane in 3D space with the number of triangle subdivisions specified. | |
box(width) // Creates a cube in 3D space. | |
box(width, height, depth) // Creates a cuboid in 3D space. | |
box(width, height, depth, detailX, detailY) // Creates a cuboid in 3D space with triangle subdivisions. | |
sphere(radius) // Creates a sphere in 3D space. |