Demo of multipart form/file uploading with hapi.js
.
npm install
npm run setup
npm run server
Then ...
using UnityEngine; | |
using System.Collections; | |
using System; | |
[RequireComponent (typeof(Rigidbody))] | |
public class PhysicsFollower : MonoBehaviour | |
{ | |
public Transform target; | |
Rigidbody rb; |
// budo boop.ts --live --dir . -- -p [ tsify --target es6 ] | |
import * as B from 'babylonjs' | |
import * as parseMagicaVoxel from 'parse-magica-voxel' | |
import * as createAOMesh from 'ao-mesher' | |
import * as fill from 'ndarray-fill' | |
import * as ndarray from 'ndarray' | |
let canvas : any = document.createElement( "canvas" ); | |
document.body.appendChild(canvas) |
using UnityEditor; | |
using UnityEngine; | |
[InitializeOnLoad] | |
class EnableThreads | |
{ | |
static EnableThreads() | |
{ | |
PlayerSettings.WebGL.linkerTarget = WebGLLinkerTarget.Wasm; | |
PlayerSettings.WebGL.threadsSupport = true; |
Unity shows the following warning on mobile devices up to Unity 2019.4: "Please note that Unity WebGL is not currently supported on mobiles. Press OK if you wish to continue anyway." This script helps you remove this warning
To see live examples see Unity Web GL Loading Test
The script will run after the build has completed and replace the checks from all generated javascript files.
// Made with Amplify Shader Editor | |
// Available at the Unity Asset Store - http://u3d.as/y3X | |
Shader "Unlit/Directional Tint" | |
{ | |
Properties | |
{ | |
_MainTex("MainTex", 2D) = "white" {} | |
_Color("Color", Color) = (1,1,1,1) | |
_ColorA("ColorA", Color) = (1,1,1,1) | |
_ColorB("ColorB", Color) = (1,1,1,1) |
using System.Collections.Generic; | |
using System.Runtime.InteropServices; | |
using UnityEngine; | |
class Render : MonoBehaviour | |
{ | |
struct DrawData | |
{ | |
public Vector3 Pos; | |
public Quaternion Rot; |
#pragma kernel CSMain | |
float4 _FrustumPlanes[6]; // 视锥体的六个面 | |
float3 _BoundMin; // 物体包围盒最小点 | |
float3 _BoundMax; // 物体包围盒最大点 | |
StructuredBuffer<float4x4> _AllMatricesBuffer; // 所有物体的复合变换矩阵 | |
AppendStructuredBuffer<uint> _VisibleIDsBuffer; // 可见物体实例ID | |
bool IsOutsideThePlane(float4 plane, float3 position) | |
{ |